sqrt
Type
function
Summary
Returns the square root of a number.
Syntax
the sqrt of <number>
sqrt(<number>)
Description
Use the sqrt function to find the square root of a number.
The square root of a number is the number which must be squared to obtain number : sqrt(number)^2 is equal to number.
If a math operation on finite inputs produces a non-finite output, an execution error is thrown. See math operations for more information.
Parameters
Name | Type | Description |
---|---|---|
number | Any non-negative number, or an expression that evaluates to such a number. |
Examples
sqrt(9) -- returns 3
put sqrt(sideA^2 + sideB^2) into hypotenuseLength
Related
control structure: function
glossary: return, non-negative, math operation
operator: caret
Compatibility and Support
Introduced
LiveCode 1.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile